package heima_bixiangdong.test.review2;

/**
 * @DESCRIPTION: 饿汉式单例模式：好处是多线程并发访问是安全的，缺点是无法做到对象的延迟加载
 * @USER: shg
 * @DATE: 2022/11/26 13:46
 */
public class HungrySingleton {

    private HungrySingleton(){}
    private static final HungrySingleton HUNGRYSINGLETON_INSTANCE = new HungrySingleton();
    public static HungrySingleton getInstance(){
        return HUNGRYSINGLETON_INSTANCE;
    }

}
